package com.situ.java.domain;

import java.io.Serializable;
import java.util.Calendar;

public class BorrowedRd implements Serializable{
    /** serialVersionUID*/  
    private static final long serialVersionUID = 151351L;
    
    private int bookID;
    private int personID;
    Calendar borrowTime;
    Calendar returnTime;

    public BorrowedRd() { }

    public BorrowedRd(int bookID, int personID) {
        this.bookID = bookID;
        this.personID = personID;
        this.borrowTime = null;
        this.returnTime = null;
    }

    public BorrowedRd(int bookID, int personID, Calendar borrowTime, Calendar returnTime) {
        this.bookID = bookID;
        this.personID = personID;
        this.borrowTime = borrowTime;
        this.returnTime = returnTime;
    }

    public int getBookID() { return bookID; }

    public void setBookID(int bookID) { this.bookID = bookID; }

    public int getPersonID() { return personID; }

    public void setPersonID(int personID) { this.personID = personID; }

    public Calendar getBorrowTime() { return borrowTime; }

    public void setBorrowTime(Calendar borrowTime) { this.borrowTime = borrowTime; }

    public Calendar getReturnTime() { return returnTime; }

    public void setReturnTime(Calendar returnTime) { this.returnTime = returnTime; }

    public String getDetails() {
        return bookID+"\t"+personID+"\t"+borrowTime+"\t"+returnTime;
    }

    @Override
    public String toString() {
        return getDetails();
    }
}
